﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.Util;
using System.Web.Mail;

public partial class 分类_910_网络_mail_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        MailMessage MyMail = new MailMessage();
        MyMail.To = "13683246141@163.com";
        MyMail.From = "13683246141@163.com";
        MyMail.Subject = "webmaster给您发了一封电子邮件";
        MyMail.BodyFormat = MailFormat.Html;
        MyMail.Body = "<html><body><h1><a href='http://www.chinaasp.com'>ChinaASP.com</a> 使用ASP+程序给你发了一封EMail! Hohoho!</h1></body></html>";

        //MyMail.Fields.Add("","");
        MyMail.Fields.Add("username", "13683246141");
        MyMail.Fields.Add("password", "123321");
        SmtpMail.SmtpServer = "smtp.163.com";
        
        SmtpMail.Send(MyMail);

        Response.Write("send ok");

    }
}

